#region Using directives
using System;
using Direct3D = Microsoft.DirectX.Direct3D;
using Microsoft.DirectX.Direct3D;
using System.IO;
using SharpWind.Helpers;
#endregion

namespace SharpWind.Resources.Textures
{
	public class Texture : Resource
	{
		#region Fields

		private Direct3D.Texture dxTexture = null;

		#endregion

		#region Methods

		internal override bool Load( string name )
		{
			if( string.IsNullOrEmpty( name ) )
			{
				throw new ArgumentNullException( "name" );
			}

			CubeTexture cb = null;

			Engine.Instance.Graphics.Device.SetTexture( 0, cb );

			this.dxTexture = TextureLoader.FromFile( Engine.Instance.Graphics.Device, Path.Combine( Directories.Textures, name ) );

			return true;
		}

		#endregion

		#region Properties

		internal Direct3D.Texture DxTexture
		{
			get
			{
				return this.dxTexture;
			}
		}

		#endregion
	}
}
